package com.starblink.guangconfig.ui.part

import android.content.Context
import com.starblink.android.basic.config.GuangConfig
import com.starblink.android.basic.ext.toast
import com.starblink.android.basic.guide.SkNoviceManage
import com.starblink.android.basic.guide.bean.SkGuideEnum
import com.starblink.android.basic.util.FlowCountDownTimer
import com.starblink.basic.storage.SkStorage
import com.starblink.basic.util.ActivityStackManage
import com.starblink.guangconfig.databinding.ActivityGuangUpConfigBinding
import com.starblink.guangconfig.ui.GuangUpConfigVM

object ImgSearchAnimPart {


    fun handleVM(context: Context, m: GuangUpConfigVM, vb: ActivityGuangUpConfigBinding) {


        var animCheckStatus = SkStorage.getBoolean(GuangConfig.ANIM_KEY, false)

        vb.imgSearchAnim.noviceGuideOpenTitle.text = "强制显示图搜结果返回动画"
        vb.imgSearchAnim.noviceGuideOpen.text = if (animCheckStatus) "开启" else "关闭"
        vb.imgSearchAnim.noviceGuideOpen.isChecked = animCheckStatus
        vb.imgSearchAnim.noviceGuideOpen.setOnClickListener {
            animCheckStatus = !animCheckStatus
            vb.imgSearchAnim.noviceGuideOpen.isChecked = animCheckStatus
            vb.imgSearchAnim.noviceGuideOpen.text = if (animCheckStatus) "开启" else "关闭"
            SkStorage.put(GuangConfig.ANIM_KEY, animCheckStatus)
        }
    }

}